﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace NIEN_LUAN
{
    public partial class FormReportLoaiHang : Form
    {
        private Db.DataContentDataContext db = new NIEN_LUAN.Db.DataContentDataContext();
        private FormQuanLyLoaiHang frmLoaihang;

        public FormReportLoaiHang()
        {
            InitializeComponent();
        }

        public FormReportLoaiHang(FormQuanLyLoaiHang frm)
        {
            InitializeComponent();
            frmLoaihang = frm;
        }


        private void FormReportLoaiHang_Load(object sender, EventArgs e)
        {
            var loaihang = (from m in db.LOAIHANGs
                           //where here                            
                           select new Db.Chitietchungtuthongke
                           {                               
                               MaLoaiHang = m.MaLoaiHang,      
                               TenHang=m.TenLoaiHang
                           }).ToList();
            this.BindingSource.DataSource = loaihang;
            this.reportViewer1.RefreshReport();
        }
    }
}
